<template>
  <div class="logo">
    <img
      src="~@/assets/img/logo.png"
      alt=""
      :class="{ 'mr-2': !props.collapsed }"
    />
    <h2 v-show="!props.collapsed" class="title">管片生产管理系统</h2>
  </div>
</template>

<script lang="ts" setup>
export interface LogoProp {
  collapsed: boolean;
}
const props = withDefaults(defineProps<LogoProp>(), {
  collapsed: false,
});
</script>

<style lang="less" scoped>
.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  line-height: 64px;
  overflow: hidden;
  white-space: nowrap;

  img {
    width: auto;
    height: 32px;
  }

  .title {
    margin-bottom: 0;
    font-weight: inherit;
  }

  .mr-2 {
    margin-right: 0.5rem;
  }
}
</style>
